/*
 * 
 * classe Aircraft Subclasse de ship, esta classe serve para a  guardar o portaavioes
 */
package battle.ship.model;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Carlos
 */
public class AircraftCarrier extends Ship{

    public AircraftCarrier() {
        this.size = 5;
        this.points = new ArrayList<>(this.size);
    }

    @Override
    public String getName() {
        return this.getClass().getSimpleName();
    }
    
    
    public List<Point> createPoint(Point point){   
        this.points.add(0, point);
        for (int i = 1; i <= this.size; i++) {
          if(this.oriention==ShipOrientation.V){
              if(i<=3){
                tempPoint.setY((point.getY()+i));
              }
              else{
                  tempPoint.setY((point.getY()+1));
                  tempPoint.setX((point.getX()+(i-3)));
              }
           }
          else if(this.oriention == ShipOrientation.H){
              if(i<=3){
                tempPoint.setX((point.getX()+i));
              }
              else{
                  tempPoint.setX((point.getX()+1));
                  tempPoint.setY((point.getY()+(i-2)));
              }
           }
          this.points.add(i, tempPoint);   
        }        
        return points;
    }
    
    public AircraftCarrier(int boardSize){
        super(boardSize);
    }
    
    @Override
    public Point getNextPoint(){
        return null;
    }
}
